<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        var name = prompt('姓名');
        var birthYear = prompt('出生年');
        var sex = prompt('性别');

        var age = 2022 - birthYear;

        alert(`您的姓名是: ${ name }\n您的年龄是: ${ age }岁\n您的性别是: ${ sex }`);

    </script>
</body>
</html>